#include "..\includes.h"
#include "cursor.h"

cursor_info_t cur_arrow={   "                  "
                            " x                "
                            " xx               "
                            " xxx              "
                            " xxxx             "
                            " xxxxx            "
                            " xxxxxx           "
                            " xxxxxxx          "
                            " xxxxxxxx         "
                            " xxxxx            "
                            " xx xx            "
                            " x   xx           "
                            "     xx           "
                            "      xx          "
                            "      xx          "
                            "                  "
                            "                  "
                            "                  ",
                            "xx                "
                            "xxx               "
                            "xxxx              "
                            "xxxxx             "
                            "xxxxxx            "
                            "xxxxxxx           "
                            "xxxxxxxx          "
                            "xxxxxxxxx         "
                            "xxxxxxxxxx        "
                            "xxxxxxxxxx        "
                            "xxxxxxx           "
                            "xxx xxxx          "
                            "xx  xxxx          "
                            "     xxxx         "
                            "     xxxx         "
                            "      xx          "
                            "                  "
                            "                  ",18,18,0,0,NULL},
cur_root={                  "                  "
                            "                  "
                            "  xxx        xxx  "
                            "  xxxx      xxxx  "
                            "  xxxxx    xxxxx  "
                            "   xxxxx  xxxxx   "
                            "    xxxxxxxxxx    "
                            "     xxxxxxxx     "
                            "      xxxxxx      "
                            "      xxxxxx      "
                            "     xxxxxxxx     "
                            "    xxxxxxxxxx    "
                            "   xxxxx  xxxxx   "
                            "  xxxxx    xxxxx  "
                            "  xxxx      xxxx  "
                            "  xxx        xxx  "
                            "                  "
                            "                  ",
                            "                  "
                            " xxxx        xxxx "
                            " xxxxx      xxxxx "
                            " xxxxxx    xxxxxx "
                            " xxxxxxx  xxxxxxx "
                            "  xxxxxxxxxxxxxx  "
                            "   xxxxxxxxxxxx   "
                            "    xxxxxxxxxx    "
                            "     xxxxxxxx     "
                            "     xxxxxxxx     "
                            "    xxxxxxxxxx    "
                            "   xxxxxxxxxxxx   "
                            "  xxxxxxxxxxxxxx  "
                            " xxxxxxx  xxxxxxx "
                            " xxxxxx    xxxxxx "
                            " xxxxx      xxxxx "
                            " xxxx        xxxx "
                            "                  ",18,18,8,8,NULL},
cur_fleur={                 "                "
                            "       xx       "
                            "      xxxx      "
                            "     xxxxxx     "
                            "       xx       "
                            "   x   xx   x   "
                            "  xx   xx   xx  "
                            " xxxxxxxxxxxxxx "
                            " xxxxxxxxxxxxxx "
                            "  xx   xx   xx  "
                            "   x   xx   x   "
                            "       xx       "
                            "     xxxxxx     "
                            "      xxxx      "
                            "       xx       "
                            "                ",
                            "      xxxx      "
                            "      xxxxx     "
                            "     xxxxxx     "
                            "    xxxxxxxx    "
                            "   x xxxxxx x   "
                            "  xxx xxxx xxx  "
                            "xxxxxxxxxxxxxxxx"
                            "xxxxxxxxxxxxxxxx"
                            "xxxxxxxxxxxxxxxx"
                            "xxxxxxxxxxxxxxxx"
                            "  xxx xxxx xxx  "
                            "   x xxxxxx x   "
                            "    xxxxxxxx    "
                            "     xxxxxx     "
                            "      xxxx      "
                            "      xxxx      ",16,16,8,8,NULL},
cur_xterm={                 "                "
                            "     xxx xxx    "
                            "       xxx      "
                            "        x       "
                            "        x       "
                            "        x       "
                            "        x       "
                            "        x       "
                            "        x       "
                            "        x       "
                            "        x       "
                            "        x       "
                            "        x       "
                            "       xxx      "
                            "     xxx xxx    "
                            "                ",
                            "    xxxx xxxx   "
                            "    xxxxxxxxx   "
                            "    xxxxxxxxx   "
                            "      xxxxx     "
                            "       xxx      "
                            "       xxx      "
                            "       xxx      "
                            "       xxx      "
                            "       xxx      "
                            "       xxx      "
                            "       xxx      "
                            "       xxx      "
                            "      xxxxx     "
                            "    xxxxxxxxx   "
                            "    xxxxxxxxx   "
                            "    xxxx xxxx   ",16,16,8,8,NULL};

HCURSOR hArrow;
ICONINFO iiCur;

void SetXCursor(rfbScreenInfoPtr rfbScreen,pcursor_info_t lpCursor)
{
    if (!lpCursor->rfb)
    {
        rfbCursorPtr c;

        c=rfbMakeXCursor(lpCursor->wx,lpCursor->wy,lpCursor->data,lpCursor->mask);
        c->xhot=lpCursor->sx;c->yhot=lpCursor->sy;
        c->cleanup=FALSE;
        lpCursor->rfb=c;
    }
	rfbSetCursor(rfbScreen,lpCursor->rfb);
}

